<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@taglib prefix="s" uri="/struts-tags" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>网上图书后台管理系统</title>
<link rel="stylesheet" type="text/css" href="style.css" />
<script type="text/javascript" src="clockp.js"></script>
<script type="text/javascript" src="clockh.js"></script> 
<script type="text/javascript" src="jquery.min.js"></script>
<script type="text/javascript" src="ddaccordion.js"></script>
<script type="text/javascript">
ddaccordion.init({
	headerclass: "submenuheader", //Shared CSS class name of headers group
	contentclass: "submenu", //Shared CSS class name of contents group
	revealtype: "click", //Reveal content when user clicks or onmouseover the header? Valid value: "click", "clickgo", or "mouseover"
	mouseoverdelay: 200, //if revealtype="mouseover", set delay in milliseconds before header expands onMouseover
	collapseprev: true, //Collapse previous content (so only one open at any time)? true/false 
	defaultexpanded: [], //index of content(s) open by default [index1, index2, etc] [] denotes no content
	onemustopen: false, //Specify whether at least one header should be open always (so never all headers closed)
	animatedefault: false, //Should contents open by default be animated into view?
	persiststate: true, //persist state of opened contents within browser session?
	toggleclass: ["", ""], //Two CSS classes to be applied to the header when it's collapsed and expanded, respectively ["class1", "class2"]
	togglehtml: ["suffix", "<img src='images/plus.gif' class='statusicon' />", "<img src='images/minus.gif' class='statusicon' />"], //Additional HTML added to the header when it's collapsed and expanded, respectively  ["position", "html1", "html2"] (see docs)
	animatespeed: "fast", //speed of animation: integer in milliseconds (ie: 200), or keywords "fast", "normal", or "slow"
	oninit:function(headers, expandedindices){ //custom code to run when headers have initalized
		//do nothing
	},
	onopenclose:function(header, index, state, isuseractivated){ //custom code to run whenever a header is opened or closed
		//do nothing
	}
})
</script>

<script type="text/javascript" src="jconfirmaction.jquery.js"></script>
<script type="text/javascript">
	
	$(document).ready(function() {
		$('.ask').jConfirmAction();
	});


function validate(){
//alert("aa");
var bname = document.getElementById("bname").value;
if(bname==""){
  alert("书名不能为空");
  return false;
}
var author = document.getElementById("author").value;
if(author==""){
  alert("作者不能为空");
  return false;
}
var quantity = document.getElementById("quantity").value;
if(quantity==""){
   alert("数量不能为空")
}


var price = document.getElementById("price").value;  
   if(price==""){
  alert("价格不能为空");
  return false;
}

var press = document.getElementById("press").value;
    if(press==""){
      alert("出版社不能为空");
    return false;
    }
var pressdate = document.getElementById("pressdate").value;
if(pressdate==""){
    alert("出版日期不能为空");
     return false;
}
var intro = document.getElementById("intro").value;
   if(intro==""){
     alert("书的简介不能为空");
     return false;
   }
}
</script>

<script language="javascript" type="text/javascript" src="niceforms.js"></script>
<link rel="stylesheet" type="text/css" media="all" href="niceforms-default.css" />

</head>
<body>
<div id="main_container">

	<div class="header">
    <div class="logo"><a href="#"><img src="images/logo.gif" alt="" title="" border="0" /></a></div>
    
    <div class="right_header">Welcome <s:property value="#session.exitcustomer"/>, | <a href="login_adminLoginout.action" class="logout">退出</a></div>
    <div id="clock_a"></div>
    </div>
    
    <div class="main_content">
    
                  <div class="menu">
                 
                    </div> 
                   
                    
                    
                    
    <div class="center_content">  
    
    
    
    <div class="left_content">
    

            
       
              
    
    </div>  
    
    <div class="right_content">            
        
    <h2>Products Categories Settings</h2> 
    
                    
                    
<table id="rounded-corner" summary="2007 Major IT Companies' Profit">


    <form action="book_editBook.action"  method="post" enctype="multipart/form-data">
       <s:hidden name="bid"></s:hidden>
      <s:iterator value="book">
   
     <tr>
        <td>书名</td>
        
        <td><input type="text" id="bname" name="bname" value="<s:property value="bname"/>" /></td>
    </tr>
     <tr>
        <td>作者</td>
        
        <td><input type="text"  id="author" name="author"  value="<s:property value="author"/>"  /></td>
    </tr>
     <tr>
        <td>数量</td>
        
        <td><input type="text"  id="quantity" name="quantity"   value="<s:property value="quantity"/>" /></td>
    </tr>
  
     <tr>
        <td>价格</td>
        
        <td><input type="text" id="price" name="price" value="<s:property value="price"/>" /></td>
    </tr>
    
     <tr>
        <td>出版社</td>
        
        <td>
        <input type="text" id="press" name="press" value="<s:property value="press"/>" />
        </td>
    </tr>
     <tr>
        <td>出版日期</td>
        
        <td>
       <!--   <input type="text"  id="pressdate" name="pressdate" value=<s:property value="pressdate" />/> -->
         <input type="text"  id="pressdate" name="pressdate" value=<s:date name="pressdate" format="yyyy-MM-dd"/>>
    </tr>

     <tr>
     <td>上传图片</td>
        <td>
                  
                <%--     <s:file name="upload" lable="选择文件"  value="<s:property value="picture"/>"></s:file>
                   --%>
                	<img  src='<s:property value="picture"/>'   style="width:20%;height:20%;"/>
                <s:file name="upload"  lable="选择文件"  ></s:file>
                 </td>
    </tr>
     <%--     <tr>
               <td>选择要添加分类</td>
               <td>
               
                 <s:select list="cList" name="choiceId" listKey="categoryid" listValue="categoryname" 
                   headerKey="" headerValue="==请选择要分类项==" />
            </td>
        </tr> --%>
                    <tr>
        <td>简介</td>
        
        <td>
         <s:textarea name="intro"></s:textarea>
         </td>
     
    </tr>
    <tr>
       <td colspan="2" align="center">
            <input type="submit" value="提交" onclick="return validate()" />
       </td>
    </tr>
     </s:iterator>
       
 
</form>      
    	
        
       
        
    </tbody>
</table>

	 <a href="#" class="bt_green"><span class="bt_green_lft"></span><strong>Add new item</strong><span class="bt_green_r"></span></a>
     <a href="#" class="bt_blue"><span class="bt_blue_lft"></span><strong>View all items from category</strong><span class="bt_blue_r"></span></a>
     <a href="#" class="bt_red"><span class="bt_red_lft"></span><strong>Delete items</strong><span class="bt_red_r"></span></a> 
     
   
     </div><!-- end of right content-->
            
                    
  </div>   <!--end of center content -->               
                    
                    
    
    
    <div class="clear"></div>
    </div> <!--end of main content-->
	
    
    <div class="footer">
    
    	<div class="left_footer">IN ADMIN PANEL | Collect from <a href="http://www.cssmoban.com">网页模板</a></div>
    	<div class="right_footer"><a href="http://www.cssmoban.com"><img src="images/indeziner_logo.gif" alt="" title="" border="0" /></a></div>
    
    </div>

</div>		
</body>
</html>